package org.example;

import java.util.Scanner;

public class 第十九章_Scanner {
    public static void main(String[] args) {
        //创建Scanner对象
        Scanner input = new Scanner(System.in);

        //接受字符串
        System.out.print("请输入字符串: ");
        String p1 = input.next();

        //接收int
        System.out.print("请输入数字: ");
        int p2 = input.nextInt();

        //接收小数
        System.out.print("请输入浮点数: ");
        double p3 = input.nextDouble();
    }
}
